package com.letcoding.easyExcel.entity.write;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.format.NumberFormat;
import com.letcoding.easyExcel.coverter.CustomStringConverter;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Date;

/**
 * @ClassName SimpleWriteEntity
 * @Description Excel格式转换实体类
 * @Author will
 * @Date 2021/5/29 21:58
 */
@Getter
@Setter
@ToString
public class CoverDataWriteEntity {
    /**
     * 我想所有的 字符串起前面加上"自定义："三个字
     */
    @ExcelProperty(value = "字符串标题", converter = CustomStringConverter.class)
    private String title;
    /**
     * 我想写到excel 用年月日的格式
     */
    @DateTimeFormat("yyyy年MM月dd日HH时mm分ss秒")
    private Date dateTitle;
    /**
     * 我想写到excel 用百分比表示
     */
    @NumberFormat("#.##%")
    @ExcelProperty("数字标题")
    private Double numberTitle;
}
